<template>
  <!-- 商品展示组件，将数据中转到 goods_list_item 内 -->
  <div class="goods">
    <goods-list-item v-for="(item, index) in goods" :key="index" :goods-item="item"/>
  </div>
</template>

<script>
import goodsListItem from './goods_list_item.vue'

export default {
  name: "goods_list",
  components: { goodsListItem },
  props: {
    goods: {
      type: Array,
      default() {
        return []
      }
    }
  }
}
</script>

<style scoped>
  .goods {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
  }
</style>